<div bsModal #newHomepage="bs-modal" class="modal fade addNew" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
    aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title pull-left">首页悬浮窗-新建</h4>
                <button type="button" class="close pull-right" (click)="closeModal()" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body clearFix">
                <div class="modal-line">
                    <span style="opacity: 0;">*</span>
                    <span class="modal-line-title"></span>
                    <div class="modal-img">
                        <img src="{{add.imageUrl}}" alt="">
                    </div>
                </div>
                <div class="modal-line">
                    <span style="color: red;">*</span>
                    <span class="modal-line-title">图片</span>
                    <div style="display: inline-block;">
                        <button class="action-btn" (click)="openSelectImageModal()">从图片库选择</button>
                        <span>或</span>
                        <a class="action-btn">浏览
                            <input type="file" value="上传图片" class="inputFile" ng2FileSelect id="homePage-uploader" [uploader]="uploader" (change)="selectedFileOnChanged($event)" />
                        </a>
                        <button class="action-btn" (click)="uploadFile(uploader.queue[0])">上传</button>
                    </div>
                </div>
                <div class="modal-line">
                    <span style="color: red;">*</span>
                    <span class="modal-line-title">描述</span>
                    <input type="text" class="form-control inp" [(ngModel)]="add.description" required>
                </div>
                <div class="modal-line homePage-header">
                    <span style="color: red; opacity: 0;">*</span>
                    <span class="modal-line-title" style="width: auto;">跳转类型</span>
                    <select name="" id="" class="sel" [(ngModel)]="add.redirectType">
                        <option value="-1">--请选择--</option>
                        <option value="{{opt.id}}" *ngFor="let opt of redirectingOptions">{{opt.name}}</option>
                        </select>
                </div>
                <div class="modal-line">
                    <span style="color: red; opacity: 0;">*</span>
                    <span class="modal-line-title">跳转参数</span>
                    <input type="text" class="form-control inp" [(ngModel)]="add.redirectValue" required>
                </div>
                <div class="modal-line">
                    <span style="opacity: 0;">*</span>
                    <span class="modal-line-title"></span>
                    <button class="confirm-btn modal-line-add" (click)="addHomepage()">新建</button>
                </div>
            </div>
        </div>
    </div>
</div>

<app-select-image-add2 #selectImage2 (SelectImage)="SelectImage($event)"></app-select-image-add2>